<!DOCTYPE html><html data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>恶霸威的学习之路 - 有志者事竟成！</title><meta name="author" content="恶霸威"><meta name="copyright" content="恶霸威"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="恶霸威的学习之路">
<meta property="og:url" content="https://simalaoshi.gitee.io/page/2/index.html">
<meta property="og:site_name" content="恶霸威的学习之路">
<meta property="og:locale">
<meta property="og:image" content="https://simalaoshi.gitee.io/img/header.png">
<meta property="article:author" content="恶霸威">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://simalaoshi.gitee.io/img/header.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://simalaoshi.gitee.io/page/2/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: 'Copy successfully',
    error: 'Copy error',
    noSupport: 'The browser does not support'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: 'Just',
    min: 'minutes ago',
    hour: 'hours ago',
    day: 'days ago',
    month: 'months ago'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"Traditional Chinese Activated Manually","cht_to_chs":"Simplified Chinese Activated Manually","day_to_night":"Dark Mode Activated Manually","night_to_day":"Light Mode Activated Manually","bgLight":"#49b1f5","bgDark":"#121212","position":"bottom-left"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = { 
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-01-12 09:26:40'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><link rel="stylesheet" href="/css/my.css"><meta name="generator" content="Hexo 5.4.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src="/img/header.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">20</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">12</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li><li><a class="site-page" href="/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li></ul></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('/img/index_top.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">恶霸威的学习之路</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 清单</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li><li><a class="site-page" href="/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">恶霸威的学习之路</h1><div id="site_social_icons"><a class="social-icon" href="https://github.com/SiMaLaoShi" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="/1742495214qq@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://www.zhihu.com/people/byxiao-wei" target="_blank" title="Zhihu"><i class="fab fa-zhihu"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-qq"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-weibo"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-weixin"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2020/11/23/Unity%E7%AE%80%E5%8D%95Hook/" title="Unity简单Hook">     <img class="post_bg" src="https://www.castify.jp/images/icon-unity.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Unity简单Hook"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/11/23/Unity%E7%AE%80%E5%8D%95Hook/" title="Unity简单Hook">Unity简单Hook</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2020-11-23T21:27:52.000Z" title="Created 2020-11-23 21:27:52">2020-11-23</time></span></div><div class="content">背景项目中我们是用Unity去跑AssetBundle，每次都要复制进SteamAsset文件夹，后面改了代码直接在加载的加一个宏，然后判断我们保存的AssetBundle的地址，同样也可以实现加载外部的AB，但是因为这个是实验性的东西，而且有些地方还是使用的SteamAsset，改动太大了，最好想到一个文件夹重定向的方法，也可以实现，但是需要第三方软件没有采用这种方式，后来想想能不能直接替换Application.streamingAssetsPath的实现，想过两种方式，替换UnityEngine.dll和Hook，先用第一种直接用dnsy去增加一个set属性，然后用dnsy替换之后发现是C++那边实现的，果断放弃，然后使用Hook，就是下面的实现方式了
工具我们要Hook，自然要使用一个Hook的相应的代码，功底不够直接上Github上找C#Hook，果然功夫不负有心人找到了下面几个
PlayHooky
MonoHook
UnityHook
果断选最简单的，反正我们不需要太多功能，直接用的是第一个。
示例12345678910111213141516171819202122232 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2020/07/02/%E8%87%AA%E7%BC%96%E8%AF%91mono%E7%83%AD%E6%9B%B4%E5%8A%A0%E5%AF%86/" title="编译Mono热更">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="编译Mono热更"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/07/02/%E8%87%AA%E7%BC%96%E8%AF%91mono%E7%83%AD%E6%9B%B4%E5%8A%A0%E5%AF%86/" title="编译Mono热更">编译Mono热更</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2020-07-02T19:27:28.000Z" title="Created 2020-07-02 19:27:28">2020-07-02</time></span></div><div class="content">需要的工具Mono选择自己的版本分支
MinGw
Zip
Android NDK
第一步配置MinGW环境一路next，记住自己的安装路径，到了这一步全勾，installation下apply change

进入到安装目录，应该有一个msys/1.0,进入到这个目录后如果没有一个home，自己建一个，然后再在home下建一个目录，用自己的用户名命名，最后应该是
msys/1.0/home/xxx
配置环境变量，刚刚保存的路径,如下配置到环境变量中，可以自己测试配置是否成功，命令行下gcc -v 有反应就对了

我们把下载好的ndk复制到 msys/1.0/home/xxx/ 下， 运行完成就可以自己会解压，然后改名为android-ndk_auto-r10e
最终路径就是 大概就是 E:\MinGW\msys\1.0\home\xxx\android-ndk_auto-r10e
下载文件
clone https://github.com/Unity-Technologies/mono
切换到你自己的分支

修改文件这个修改是为了让我们编译器支持msys PrepareAndroidS ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2020/05/17/RT%E6%B8%B2%E6%9F%93%E7%89%B9%E6%95%88%E5%92%8C%E6%A8%A1%E5%9E%8B/" title="RT渲染特效和模型的研究">     <img class="post_bg" src="https://www.castify.jp/images/icon-unity.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="RT渲染特效和模型的研究"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/05/17/RT%E6%B8%B2%E6%9F%93%E7%89%B9%E6%95%88%E5%92%8C%E6%A8%A1%E5%9E%8B/" title="RT渲染特效和模型的研究">RT渲染特效和模型的研究</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2020-05-17T22:12:51.000Z" title="Created 2020-05-17 22:12:51">2020-05-17</time></span></div><div class="content">RT需求项目中我们有用到模型在ui上显示，一般有两种方式一种是直接挂模型，然后通过调整RenderQueue来保证渲染顺序，但是太过复制，没有使用    
还有一种就是通过RT渲染到ui上，然后通过ui原生的渲染方式去保证我们渲染队列的正确，多一张RT的内存，我们选用的是rt的方式。
问题问题就是RT在渲染粒子的时候，我们使用的是不带通道的雪花片，在3d场景中通过下面的混合方式达到透明效果，我们的RT相机一般设置SolidColor模式，颜色全是0
第一次Alpha Blend
Particle &amp; Background  ==&gt; RenderTexture    

雪花片背景是黑色的我们要过滤掉黑色，参考滤色公式 ，最终表达为如下

结果色=255－[（255－基色）×（255－混合色）]/255

12Blend OneMinusDstColor OneBlend One OneMinusSrcColor

1234 Blend One OneMinusSrcColor // 混合公式是滤色，黑色作为透明色ColorMask RGBA// Mask保留RGBA

第 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2020/04/05/Profile%E7%9C%9F%E6%9C%BA/" title="UnityProfile真机">     <img class="post_bg" src="https://www.castify.jp/images/icon-unity.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="UnityProfile真机"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/04/05/Profile%E7%9C%9F%E6%9C%BA/" title="UnityProfile真机">UnityProfile真机</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2020-04-05T19:32:55.000Z" title="Created 2020-04-05 19:32:55">2020-04-05</time></span></div><div class="content">20221025更新
2019的LTS版本可以勾选Autoconnect Profiler（2019.4.40）
2020的LTS版本不要勾选Autoconnect Profiler，不要勾选Autoconnect Profiler，不要勾选Autoconnect Profiler（2020.4.36）
2021的LTS版本不要勾选Autoconnect Profiler，不要勾选Autoconnect Profiler，不要勾选Autoconnect Profiler（2020.3.10）

打包把这四个选项都勾上，第一个是必要勾的，第二个是profile，三四是调试使用的，这个教程是针对profile的

直接build，build完成后生成的apk在右下角会dev标志，没有就是不能开发包，不能调试和profile，重新打
BuildRun如果能直接BuildRun，然后直接能在模拟器上运行看profile，那么你可以不用继续看了

Profile按上面的教程生成一个dev的包，因为有可能我们根本用不上profile，而是打包机打的dev包，诸多限制用不到自己打包。
然后新建一个工 ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/04/02/SVNHook/" title="SVN Hook">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SVN Hook"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/04/02/SVNHook/" title="SVN Hook">SVN Hook</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-04-02T11:21:11.000Z" title="Created 2019-04-02 11:21:11">2019-04-02</time></span></div><div class="content">需求在我们开发游戏，我们之前管理资源的时候，总是遇到不规范提交，比如贴图什么的没有带.meta,代码不是utf-8，什么没加日志，什么之类导致查问题查好久，就想着怎么不然让这些提交，或者提醒他们哪里不规范之类，就想着搞一搞
思路一些资源我们在unity提交到时候，直接通过unity去检查，然后提醒，但是想着美术不用unity怎么办，或者在unity文件夹外面怎么样，等等一些问题，好像坐在svn好一点，刚好svn也有 pre-comint, post-comit 等等一些hook，脚本，不熟悉这些是什么东西的可以自行查找资料熟悉一下。推荐小乌龟，安装的时候要勾选命令行行工具。
工具小乌龟服务端
小乌龟客户端
Python
实现我们用新建一个仓库，或者在原来有仓库找到下面的目录，仓库根目录，有下面几个文件夹，我们进入到hook，先不用关闭

在svn服务端选到管理Hook选项

出现这样一个东东，就是我们上面提到的pre,post等等，我们只要用pre就行了，双击

出来一个这个东西，把下面我的代码复制进去，然后点确定，会在我们的版本库根目录的hook文件夹生成一个pre-commit.c ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/27/Excel%E5%AF%BClua%E8%A1%A8%E5%B7%A5%E5%85%B7/" title="Excel导lua表工具">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Excel导lua表工具"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/27/Excel%E5%AF%BClua%E8%A1%A8%E5%B7%A5%E5%85%B7/" title="Excel导lua表工具">Excel导lua表工具</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-03-27T11:34:54.000Z" title="Created 2019-03-27 11:34:54">2019-03-27</time></span></div><div class="content">##前言    工作需要用到lua表，基于java实现###

1  表格结构    第一行：字段名  第二行：策划描述  第三行：数据类型（后面有对应）  第四行：类型含义（策划用）  第五行：导表控制行  第六行：数据默认行（后面会有这行的用法）  导出的表名和文件名是sheet名（支持多个sheet）
2  导出lua中的结构(优化过的)  InteractionTable.lua        
3  使用方法  (如果是第一次使用)直接使用jar包运行即可，使用完成后有一个同级目录
1 工作目录配置在jar包的同级木新建一个config.properties或者直接用我的config.propertieServer:服务器表保存目录Client:客户端表保存目录lastPath:jar包自动生成的最后一个打开的工作目录
2配置好后直接运行jar包即可，如果想要看输出日志用命令行运行即可 java -jar ExcelTool.jar

  参考链接  本文git

</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/25/lua%E4%BD%8D%E8%BF%90%E7%AE%97/" title="lua位运算">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="lua位运算"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/25/lua%E4%BD%8D%E8%BF%90%E7%AE%97/" title="lua位运算">lua位运算</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-03-25T15:22:14.000Z" title="Created 2019-03-25 15:22:14">2019-03-25</time></span></div><div class="content">
1 位运算这个是第三方实现的位运算blog使用lua实现位运算123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168--位运算--[[Description:    FileName:bit.lua    This module provides a sele ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/22/tolua%E4%B8%AD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E6%9E%90/" title="tolua中的一些分析">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="tolua中的一些分析"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/22/tolua%E4%B8%AD%E7%9A%84%E4%B8%80%E4%BA%9B%E5%88%86%E6%9E%90/" title="tolua中的一些分析">tolua中的一些分析</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-03-22T11:17:26.000Z" title="Created 2019-03-22 11:17:26">2019-03-22</time></span></div><div class="content">
1 toLua 中Vector3:Add() 和 运算符+ 以及逻辑运算1234567891011121314151617181920212223242526272829303132local va = Vector3.zerolocal vb = Vector3.onelocal x1 = os.clock()for i = 1, 100000 do    va = va + vbendlocal x2 = os.clock()print(&quot;first time &quot;,x2 - x1,tostring(va))local va = Vector3.zerolocal vb = Vector3.onelocal x1 = os.clock()for i = 1, 10000 do    va = va:Add(vb)endlocal x2 = os.clock()print(&quot;second time &quot;,x2 - x1,tostring(va))local va = Vector3.zerolocal vb = Vector3.onelocal  ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2019/03/22/unity5.x%E5%8A%A8%E6%80%81%E6%9B%BF%E6%8D%A2%E9%97%AA%E5%B1%8F%E8%AE%BE%E7%BD%AE/" title="unity5.x动态替换闪屏设置">     <img class="post_bg" src="https://www.castify.jp/images/icon-unity.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="unity5.x动态替换闪屏设置"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/22/unity5.x%E5%8A%A8%E6%80%81%E6%9B%BF%E6%8D%A2%E9%97%AA%E5%B1%8F%E8%AE%BE%E7%BD%AE/" title="unity5.x动态替换闪屏设置">unity5.x动态替换闪屏设置</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-03-22T11:14:39.000Z" title="Created 2019-03-22 11:14:39">2019-03-22</time></span></div><div class="content">方式1（简单）直接通过文件拷贝直接覆盖掉我们的源Splash，保证.meta文件不改变就好了，不会丢失引用。
方式2（推荐）这个是我们的重头戏，通过反射来我们的闪屏，反射很强大的,直接贴代码了，为什么能这样做？为什么我知道有这个属性可以实现设置闪屏？
首先我们分析一下，为什么我们拷贝一个工程后可以为什么可以保存一些设置，这个推荐看一下unity官方教程，我们的引用都是保存在文件里面，我们称为复合文件，就一个资产文件可以引用多个文件，这个文件的引用保存在自身里面，推荐用文件编辑器打开一下prefab，基本上就能理解复合文件，这些这个文件又是怎么显示在我们unity里面，答案是序列化，这里我们知道ProjectSettings的所有配置都保存在SerializedProperty下，然后用文本编辑器打开，打开乱码的自行设置一下序列化类型（百度），看到了这些有基础的大概都明白了，YAML语法序列化，我们要找？？接第一种方式为什么我可以直接覆盖图片达到效果？？这里自己思考一下，直接复制我们文件的guid到文件里面查找，大概会找到这样一个东西（加入你自己手动设置了闪屏的话）

看到这里你应该会自 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2019/03/21/%E9%AB%98%E6%80%A7%E8%83%BD%E7%9A%84lua%E4%BB%A3%E7%A0%81/" title="高性能的lua代码">     <img class="post_bg" src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="高性能的lua代码"></a></div><div class="recent-post-info"><a class="article-title" href="/2019/03/21/%E9%AB%98%E6%80%A7%E8%83%BD%E7%9A%84lua%E4%BB%A3%E7%A0%81/" title="高性能的lua代码">高性能的lua代码</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">Created</span><time datetime="2019-03-21T18:05:08.000Z" title="Created 2019-03-21 18:05:08">2019-03-21</time></span></div><div class="content">
1 变量访问速度 local &gt; upValue &gt; Global1234567891011121314151617181920212223242526272829local x1 = os.clock()for i = 1, 100000 do    local a = 10000    a = a * iendlocal x2 = os.clock()print(&quot;local speed&quot;, x2 - x1)local x1 = os.clock()local a = 10000for i = 1, 100000 do    a = a * iendlocal x2 = os.clock()print(&quot;upValue speed&quot;, x2 - x1)local x1 = os.clock()a = 10000for i = 1, 100000 do    a = a * iendlocal x2 = os.clock()print(&quot;global speed&quot;, x2 - x1)--local speed	 ...</div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/">1</a><span class="page-number current">2</span></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src="/img/header.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">恶霸威</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">20</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">12</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/SiMaLaoShi"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/SiMaLaoShi" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="/1742495214qq@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://www.zhihu.com/people/byxiao-wei" target="_blank" title="Zhihu"><i class="fab fa-zhihu"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-qq"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-weibo"></i></a><a class="social-icon" href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=242863121" target="_blank" title=""><i class="fab fa-weixin"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>Announcement</span></div><div class="announcement_content">泯然众人矣！</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2022/09/02/pkg-doctor%E5%8D%87%E7%BA%A7%E7%BC%96%E8%AF%91%E6%8C%87%E5%8D%97/" title="pkg-doctor升级编译指南"><img src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="pkg-doctor升级编译指南"/></a><div class="content"><a class="title" href="/2022/09/02/pkg-doctor%E5%8D%87%E7%BA%A7%E7%BC%96%E8%AF%91%E6%8C%87%E5%8D%97/" title="pkg-doctor升级编译指南">pkg-doctor升级编译指南</a><time datetime="2022-09-02T10:04:48.000Z" title="Created 2022-09-02 10:04:48">2022-09-02</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%E5%AF%BC%E8%A1%A8%E5%B7%A5%E5%85%B7/" title="一百行代码实现一个简易导表工具"><img src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="一百行代码实现一个简易导表工具"/></a><div class="content"><a class="title" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%E5%AF%BC%E8%A1%A8%E5%B7%A5%E5%85%B7/" title="一百行代码实现一个简易导表工具">一百行代码实现一个简易导表工具</a><time datetime="2022-06-10T18:34:09.000Z" title="Created 2022-06-10 18:34:09">2022-06-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E7%AE%80%E6%98%93AStar/" title="一百行代码实现简易AStar"><img src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="一百行代码实现简易AStar"/></a><div class="content"><a class="title" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E7%AE%80%E6%98%93AStar/" title="一百行代码实现简易AStar">一百行代码实现简易AStar</a><time datetime="2022-06-10T15:10:56.000Z" title="Created 2022-06-10 15:10:56">2022-06-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%E7%9A%84%E7%BA%A2%E7%82%B9%E7%B3%BB%E7%BB%9F/" title="一百行代码实现一个简易的红点系统"><img src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="一百行代码实现一个简易的红点系统"/></a><div class="content"><a class="title" href="/2022/06/10/%E4%B8%80%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E5%AE%9E%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%E7%9A%84%E7%BA%A2%E7%82%B9%E7%B3%BB%E7%BB%9F/" title="一百行代码实现一个简易的红点系统">一百行代码实现一个简易的红点系统</a><time datetime="2022-06-10T14:54:19.000Z" title="Created 2022-06-10 14:54:19">2022-06-10</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/02/17/unity%E6%B7%B1%E5%BA%A6profile-deep-profile/" title="unity深度profile(deep-profile)"><img src="/img/cover.svg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="unity深度profile(deep-profile)"/></a><div class="content"><a class="title" href="/2022/02/17/unity%E6%B7%B1%E5%BA%A6profile-deep-profile/" title="unity深度profile(deep-profile)">unity深度profile(deep-profile)</a><time datetime="2022-02-17T16:23:03.000Z" title="Created 2022-02-17 16:23:03">2022-02-17</time></div></div></div></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>Tags</span></div><div class="card-tag-cloud"><a href="/tags/Hook/" style="font-size: 1.1em; color: #999">Hook</a> <a href="/tags/Mono/" style="font-size: 1.1em; color: #999">Mono</a> <a href="/tags/Unity/" style="font-size: 1.5em; color: #99a9bf">Unity</a> <a href="/tags/excel/" style="font-size: 1.1em; color: #999">excel</a> <a href="/tags/java/" style="font-size: 1.1em; color: #999">java</a> <a href="/tags/lua/" style="font-size: 1.5em; color: #99a9bf">lua</a> <a href="/tags/lua-python/" style="font-size: 1.1em; color: #999">lua, python</a> <a href="/tags/svn/" style="font-size: 1.1em; color: #999">svn</a> <a href="/tags/tolua/" style="font-size: 1.1em; color: #999">tolua</a> <a href="/tags/unity/" style="font-size: 1.23em; color: #999ea6">unity</a> <a href="/tags/%E5%B7%A5%E5%85%B7/" style="font-size: 1.37em; color: #99a4b2">工具</a> <a href="/tags/%E7%83%AD%E6%9B%B4/" style="font-size: 1.1em; color: #999">热更</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>Archives</span><a class="card-more-btn" href="/archives/" title="More">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/09/"><span class="card-archive-list-date">September 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/06/"><span class="card-archive-list-date">June 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/02/"><span class="card-archive-list-date">February 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/12/"><span class="card-archive-list-date">December 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/06/"><span class="card-archive-list-date">June 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/03/"><span class="card-archive-list-date">March 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/11/"><span class="card-archive-list-date">November 2020</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/07/"><span class="card-archive-list-date">July 2020</span><span class="card-archive-list-count">1</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>Info</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">Article :</div><div class="item-count">20</div></div><div class="webinfo-item"><div class="item-name">UV :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">PV :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">Last Push :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-01-12T09:26:40.341Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By 恶霸威</div><div class="framework-info"><span>Framework </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>Theme </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="Toggle Between Light And Dark Mode"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="Toggle between single-column and double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="Setting"><i class="fas fa-cog fa-spin"></i></button><button id="chat_btn" type="button" title="rightside.chat_btn"><i class="fas fa-sms"></i></button><button id="go-up" type="button" title="Back To Top"><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><div class="js-pjax"></div><script defer="defer" id="ribbon" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-ribbon.min.js" size="150" alpha="0.6" zIndex="-1" mobile="false" data-click="false"></script><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script src="//code.tidio.co/null.js" async="async"></script><script>function onTidioChatApiReady() {
  window.tidioChatApi.hide();
  window.tidioChatApi.on("close", function() {
    window.tidioChatApi.hide();
  });
}
if (window.tidioChatApi) {
  window.tidioChatApi.on("ready", onTidioChatApiReady);
} else {
  document.addEventListener("tidioChat-ready", onTidioChatApiReady);
}

var chatBtnFn = () => {
  document.getElementById("chat_btn").addEventListener("click", function(){
    window.tidioChatApi.show();
    window.tidioChatApi.open();
  });
}
chatBtnFn()
</script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"/live2dw/assets/miku.model.json"},"display":{"position":"right","width":150,"height":300},"mobile":{"show":true}});</script></body></html>